package leetcode.offer;

/**
 * ClassName: Offer65_Add
 * Description: leetcode-剑指offer 65 不用加减乘除做加法
 * date: 2021-11-16 22:30
 *
 * @author liyifan
 */
public class Offer65_Add {
    public int add(int a, int b) {
        while (b != 0) {
            int c = (a & b) << 1;
            a ^= b;
            b = c;
        }
        return a;
    }
}
